package hcn.protocol.brandnew.dengji.menzhenyuyue;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 排班信息查询-响应消息(成功) - ODS_02040008_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ListDoctorResponse {

    /**
     * 排班信息列表
     */
    @XmlElementWrapper(name = "Schedules")
    @XmlElement(name = "Schedule")
    private List<Schedule> schedules;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class TimeFrame {

        /**
         * 资源级别代码
         */

        @XmlElement(name = "ResourceLevelCode")
        @DictionaryMapping("hcn.registration.resourceLevelCode")
        private String resourceLevelCode;
        /**
         * 就诊日期时间
         */
        @XmlElement(name = "VisitDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date visitDate;
        /**
         * 医师排班类别代码
         */
        @DictionaryMapping("hcn.base.dictionary.HCN_outpatientSchedulingService")
        @XmlElement(name = "DoctorDutyType")
        private String doctorDutyType;
        /**
         * 医生排班流水号（排班标识）
         */
        @XmlElement(name = "ScheduleMark")
        private String scheduleMark;
        /**
         * 排班状态
         */
        @XmlElement(name = "ArrangeStatus")
        private String arrangeStatus;
        /**
         * 排班号源总数
         */
        @XmlElement(name = "ResourceSumTotal")
        private Integer resourceSumTotal;
        /**
         * 就诊地址
         */
        @XmlElement(name = "AdmitAddress")
        private String admitAddress;
        /**
         * 剩余号源数
         */
        @XmlElement(name = "RemainNumber")
        private Integer remainNumber;
        /**
         * 挂号费（元）
         */
        @XmlElement(name = "RegisteredCost")
        private String registeredCost;
        /**
         * 诊查费（元）
         */
        @XmlElement(name = "ExaminationCost")
        private String examinationCost;
        /**
         * 专家费（元）
         */
        @XmlElement(name = "DoctorCost")
        private String doctorCost;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Schedule {

        /**
         * 医疗机构组织机构代码
         */
        @XmlElement(name = "AuthorOrganization")
        private String authorOrganization;
        /**
         * 挂号科室代码
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 挂号科室名称
         */
        @XmlElement(name = "DeptName")
        private String deptName;
        /**
         * 出诊医生医护人员工号
         */
        @XmlElement(name = "DoctorCode")
        private String doctorCode;
        /**
         * 出诊医生姓名
         */
        @XmlElement(name = "DoctorName")
        private String doctorName;
        /**
         * 医生性别代码
         */
        @XmlElement(name = "DoctorSex")
        private String doctorSex;
        /**
         * 专业技术职务类别代码
         */
        @XmlElement(name = "ProfessionalJobCategoryCode")
        private String professionalJobCategoryCode;
        /**
         * 专业技术职务类别名称
         */
        @XmlElement(name = "ProfessionalCategoryName")
        private String professionalCategoryName;
        /**
         * 医生擅长
         */
        @XmlElement(name = "DoctorGoodAt")
        private String doctorGoodAt;
        /**
         * 医生介绍
         */
        @XmlElement(name = "DoctorInformation")
        private String doctorInformation;
        /**
         * 排班集合
         */
        @XmlElementWrapper(name = "TimeFrames")
        @XmlElement(name = "TimeFrame")
        private List<TimeFrame> timeFrames;
    }

}
